#include<stdio.h>
#include<stdlib.h>

int main()
{
    double income, stdval;
    int state, children;
    printf("请输入您的年收入：");
    scanf("%lf", &income);
    if(income <= 9350)
    {
        printf("0\n");
        exit(0);
    }
    printf("您的申报状态是什么？\n"\
           "1) 单身\n"\
           "2) 已婚共同申报\n"\
           "3) 已婚分开申报\n"\
           "请输入数字：");
    scanf("%d", &state); 
    switch(state)
    {
    case 2:
        stdval = 11400;
        printf("您有几个孩子？");
        scanf("%d", &children);
        stdval += (2 + children) * 3650;
        break;
    case 1:
    case 3:
        stdval = 9350;
        break;
    default:
        printf("输入选项错误！\n");
        exit(1);
    }
    double res = income - stdval;
    if(res <= 16750)
    {
        printf("%.2lf\n", res * 0.1);
    }
    else if(res <= 68000)
    {
        printf("%.2lf\n", 1675 + (res - 16750) * 0.15);
    }
    else if(res <= 137300)
    {
        printf("%.2lf\n", 9362.5 + (res - 68000) * 0.25);
    }
    else
    {
        printf("%.2lf\n", 26687.5 + (res - 137300) * 0.28);
    }
    return 0;
} 
